<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> --%>

<div style="margin-top:50px" align="center">
<%
String path = request.getContextPath();
pageContext.setAttribute("path",path);
pageContext.setAttribute("prefix","_SecurityConfig_");
%>
<form id="SecurityConfig">
<fieldset style="width:90%">
  <legend><span>管理域选择</span></legend>
  <table width="80%" border="0" align="center" cellpadding="0" cellspacing="2">
      <tr>
        <td width="28%" align="left">登录失败最大重试次数</td>
        <td width="20%" align="left"><select style="width:40px;" name="loginTryTimes">
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
        </select></td>
        <td width="10%">&nbsp;</td>
        <td width="25%" align="left">登录失败次数判断时长(分钟)</td>
        <td width="17%" align="left"><select style="width:40px;" name="loginTimeout">
          <option>15</option>
          <option>30</option>
          <option>45</option>
        </select></td>
      </tr>
      <tr>
        <td align="left">登录失败用户自动锁定时长(分钟)</td>
        <td align="left"><select style="width:40px;" name="unlockedTimeout">
			<option>15</option>
			<option>30</option>
			<option>45</option></select></td>
        <td>&nbsp;</td>
        <td align="left">登录用户在线最大空闲时长</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="sessionIdleTime">
            <option>5</option>
            <option>15</option>
            <option>30</option>
            <option>45</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">是否显示登录消息通知</td>
        <td colspan="4" align="left"><span style="margin-top:10px">
          <input name="isViewLoginAlert" type="checkbox" />
        </span></td>
        </tr>
      <tr>
        <td align="left">登录消息通知内容</td>
        <td colspan="4" align="left"><span style="margin-top:10px;margin-left:5px">
          <textarea name="loginAlertContent" cols="60" rows="6" ></textarea>
        </span></td>
        </tr>
  </table>
</fieldset>
<fieldset style="width:90%">
  <legend><span>验证策略配置</span></legend>
  <table width="80%" border="0" align="center" cellpadding="0" cellspacing="2">
      <tr>
        <td width="28%" align="left">用户名称最小长度</td>
        <td width="20%" align="left"><select style="width:40px;" name="minUsername">
          <option>4</option>
          <option>6</option>
          <option>8</option>
        </select></td>
        <td width="10%">&nbsp;</td>
        <td width="25%" align="left">用户名称最大长度</td>
        <td width="17%" align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxUsername">
            <option>8</option>
            <option>16</option>
            <option>32</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码最小长度</td>
        <td align="left"><select style="width:40px;" name="minPassword">
          <option>6</option>
          <option>8</option>
          <option>12</option>
        </select></td>
        <td>&nbsp;</td>
        <td align="left">密码最大长度</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxPassword">
            <option>8</option>
            <option>16</option>
            <option>32</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码数字字符最小个数</td>
        <td align="left"><select style="width:40px;" name="minPasswordDec">
          <option>0</option>
          <option>2</option>
          <option>6</option>
        </select></td>
        <td>&nbsp;</td>
        <td align="left">密码数字字符最大个数</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxPasswordDec">
            <option>6</option>
            <option>8</option>
            <option>16</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码大写字母最小个数</td>
        <td align="left"><select style="width:40px;" name="minPasswordUpper">
          <option>0</option>
          <option>2</option>
          <option>6</option>
        </select></td>
        <td>&nbsp;</td>
        <td align="left">密码大写字母最大个数</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxPasswordUpper">
            <option>6</option>
            <option>8</option>
            <option>16</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码小写字母最小个数</td>
        <td align="left"><select style="width:40px;" name="minPasswordLower">
          <option>0</option>
          <option>2</option>
          <option>6</option>
        </select></td>
        <td>&nbsp;</td>
        <td align="left">密码小写字母最大个数</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxPasswordLower">
            <option>6</option>
            <option>8</option>
            <option>16</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码特殊字符最小个数</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="minPasswordSpecialChar">
            <option>0</option>
            <option>2</option>
            <option>6</option>
          </select>
        </span></td>
        <td>&nbsp;</td>
        <td align="left">密码特殊字符最大个数</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="maxPasswordSpecialChar">
            <option>6</option>
            <option>8</option>
            <option>16</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码过期前是否提醒</td>
        <td align="left"><input name="isPasswordExpiredAlert" type="checkbox" checked="checked" /></td>
        <td>&nbsp;</td>
        <td align="left">密码过期提醒提前时间(天)</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="passwordExpiredAheadTime">
            <option>5</option>
            <option>10</option>
            <option>15</option>
          </select>
        </span></td>
      </tr>
      <tr>
        <td align="left">密码最大有效期(天)</td>
        <td align="left"><span style="margin-top:10px">
          <select style="width:40px;" name="passwordValidateTimeout">
            <option>15</option>
            <option>30</option>
            <option>60</option>
            <option>90</option>
          </select>
        </span></td>
        <td>&nbsp;</td>
        <td align="left">首次登录必须修改密码</td>
        <td align="left"><span style="margin-top:10px">
	        <input name="firstLoginEditPassword" type="checkbox" />
        </span></td>
      </tr>
      </table>
</fieldset>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40" align="center"><input type="button" onclick="HMSSecurity.SaveSecurityPolicy(document.getElementById('SecurityConfig'));" value="保存" />
      <input type="reset" value="重置"/></td>
  </tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<script>
	HMSSecurity.FillSecurityPolicy(document.getElementById("SecurityConfig"));
</script>
</form>
</div>
